/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package androidgetdata;

/**
 *
 * @author asus
 */
public class NewsPreview {
    // public static string to set value of content
   
    
    private String title;
    private String imageUrl;
    private String url;
    private String hotContent;
    private String parentUrl;
    private String parentImageUrl;

    public NewsPreview() {
        title = imageUrl = url = hotContent = "";
        parentImageUrl = ConstantCompare.NewsPreview_Image_ParentUrl;
        parentUrl = ConstantCompare.NewsPreview_ParentUrl;
    }

    @Override
    public String toString() {
        return "\nTitle: " + getTitle()
                + "\nImage: " + getImageUrl()
                + "\nUrl: " + getUrl()
                + "\nHotContent: " + getHotContent();
    }

    /**
     * @return the Title
     */
    public String getTitle() {
        return title;
    }

    /**
     * @param Title the Title to set
     */
    public void setTitle(String Title) {
        this.title = Title;
    }

    /**
     * @return the ImageUrl
     */
    public String getImageUrl() {
        if (imageUrl.equals("")) {
            return imageUrl;
        } else {
            return parentImageUrl + imageUrl.substring(3, imageUrl.length());
        }
    }

    /**
     * @param ImageUrl the ImageUrl to set
     */
    public void setImageUrl(String ImageUrl) {
        this.imageUrl = ImageUrl;
    }

    /**
     * @return the Url
     */
    public String getUrl() {
        if (url.equals("")) {
            return url;
        } else {
            return parentUrl + url;
        }
    }

    /**
     * @param Url the Url to set
     */
    public void setUrl(String Url) {
        this.url = Url;
    }

    /**
     * @return the HotContent
     */
    public String getHotContent() {
        return hotContent;
    }

    /**
     * @param HotContent the HotContent to set
     */
    public void setHotContent(String HotContent) {
        this.hotContent = HotContent;
    }

    /**
     * @return the parentUrl
     */
    public String getParentUrl() {
        return parentUrl;
    }

    /**
     * @param parentUrl the parentUrl to set
     */
    public void setParentUrl(String parentUrl) {
        this.parentUrl = parentUrl;
    }
}
